package testing;
import logic.Parser;

public class DateParserTest {

	private static final String[] test = {
			"2 days and 3 seconds before next Tuesday",
			"next Tuesday repeat every week and 3 seconds eleven times",
			"every week and two days until 30th of dec starting from 5th of november",
			"every second week and third day until 31st of December starting 2 days after tomorrow",
			"every second minute 12 times starting after today",
			"2 days before next Sun repeat every two days", "next Wednesday 9am",
			"due next tuesday 7 am" };

	public static void main(String args[]) throws Exception {
		System.out.println("Test of date parsing");
		
		for (int i = 0; i < test.length; i++) {
			Parser p = new Parser(test[i]);
			System.out.println("Results for " + test[i]);
			System.out.println("Acceptable: " + p.isInAcceptableFormat());
			System.out.println("Repetitive: " + p.isRepetitive());
			System.out.println("Occurrences: " + p.getNumberOfOccurrences());
			System.out.println("Period: " + p.getPeriod());
			System.out.println("Time: " + p.getDate().toString());
			System.out.println("");
		}
	}
}
